package xyz.flowlight.controller;

import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;
import xyz.flowlight.domain.dto.LoginDTO;
import xyz.flowlight.domain.response.ResponseResult;
import xyz.flowlight.service.UserService;


@RestController
@Tag(name = "用户相关接口")
@RequestMapping("/user")
public class UserController {

    @Resource
    private UserService userService;

    //登录
    @PostMapping("/login")
    public ResponseResult login(@RequestBody LoginDTO loginDTO) {
        return userService.userLogin(loginDTO);
    }



}
